package ten;

import static util.Print.print;

/**
 * Created by ab on 2016/11/4.
 */
public class lesson2 {
    class Contents {
        private int i = 11;

        public int value() {
            return i;
        }
    }

    //Destination 目的地
    class Destination {
        private String label;

        Destination(String whereTo) {
            label = whereTo;
        }

        String readLabel() {
            return label;
        }
    }

    public Destination to(String s) {
        return new Destination(s);
    }

    public Contents contents() {
        return new Contents();
    }

    public void ship(String dest) {
        lesson2.Contents c = contents();
        lesson2.Destination d = to(dest);
        print(d.readLabel());
    }

    public static void main(String[] args){
        lesson2 l =new lesson2();
        l.ship("Tasmania");
        lesson2 l2=new lesson2();
        //Defining references to inner classes;
        lesson2.Contents c = l2 .contents();
        lesson2.Destination d =l2.to("Borneo");
    }
}
